<!--
*Author：jxx
 *Contact：283591387@qq.com
 *代码由框架生成,任何更改都可能导致被代码生成器覆盖
 *业务请在@/extension/dbtest/logisticsites/task_flowtask.jsx此处编写
 -->
<template>
    <view-grid ref="grid"
               :columns="columns"
               :detail="detail"
               :details="details"
               :editFormFields="editFormFields"
               :editFormOptions="editFormOptions"
               :searchFormFields="searchFormFields"
               :searchFormOptions="searchFormOptions"
               :table="table"
               :extend="extend">
    </view-grid>
</template>
<script>
    import extend from "@/extension/demoproject/logisticsites/task_flowtask.jsx";
    import { ref, defineComponent } from "vue";
    export default defineComponent({
        setup() {
            const table = ref({
                key: 'id',
                footer: "Foots",
                cnName: 'AGV任务下发',
                name: 'logisticsites/task_flowtask',
                newTabEdit: false,
                url: "/task_flowtask/",
                sortName: "datetime"
            });
            const editFormFields = ref({});
            const editFormOptions = ref([]);
            const searchFormFields = ref({"carryID":"","AGV":"","status":""});
            const searchFormOptions = ref([[{"title":"主任务号","field":"carryID","type":"="},{"title":"AGV小车","field":"AGV","type":"="},{"dataKey":"AGV任务下发状态","data":[],"title":"任务状态","field":"status","type":"select"}]]);
            const columns = ref([{field:'carryID',title:'主任务号',type:'string',sort:true,width:100,align:'left'},
                       {field:'id',title:'任务编号',type:'int',sort:true,width:50,readonly:true,require:true,align:'left'},
                       {field:'target',title:'目标位置',type:'int',sort:true,width:60,align:'left'},
                       {field:'cmd',title:'命令动作',type:'string',width:100,align:'left'},
                       {field:'AGV',title:'AGV小车',type:'string',sort:true,width:100,align:'left'},
                       {field:'status',title:'任务状态',type:'int',bind:{ key:'AGV任务下发状态',data:[]},width:80,align:'left'},
                       {field:'datetime',title:'任务时间',type:'datetime',width:110,align:'left'}]);
            const detail = ref({columns:[]});
            const details = ref([]);
            return {
                table,
                extend,
                editFormFields,
                editFormOptions,
                searchFormFields,
                searchFormOptions,
                columns,
                detail,
                details
            };
        },
    });
</script>
